package org.brisling.sysman.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.brisling.base.domain.impl.BaseTreeDomain;
import org.brisling.base.domain.inf.BaseTreeDomainInf;
import org.brisling.base.domain.inf.BaseTreeNodeInf;
import org.brisling.common.ConstSysParam;


/**
 * 
 * 部门管理实体类
 * @author : jackson wang
 * @Date   : 2015年10月8日 下午10:01:07
 * @version: 1.0
 * 
 */
@Entity
@Table(name=ConstSysParam.MODULE_DEPARTMENT)
public class Department extends BaseTreeDomain implements BaseTreeDomainInf,BaseTreeNodeInf {
	
	
	@Column
	private String shortName;
	
	@Column
	private String longName;
	
	private String eName;
	
	private String iconCls;
	
	private String siteName;
	
	private String tel;
	
	private String fax;
	
	@Transient
	private String text;

	/**
	 * 核算科室
	 */
	
	private Long accounting_deptid;
	
	
	@Transient
	private String extend;
	
	
	/**
	 * 节点类型
	 */
	@Transient
	private String nodeType = "T";
	
	
	//实际id值
	@Transient
	private Long rid;
	
	
	public Long getRid() {
		return rid;
	}


	public void setRid(Long rid) {
		this.rid = rid;
	}
		
	public String geteName() {
		return eName;
	}



	public void seteName(String eName) {
		this.eName = eName;
	}



	public String getIconCls() {
		return iconCls;
	}



	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}



	public String getTel() {
		return tel;
	}



	public void setTel(String tel) {
		this.tel = tel;
	}



	public String getFax() {
		return fax;
	}



	public void setFax(String fax) {
		this.fax = fax;
	}



	public Department(){
		
	};
	
	

	public String getShortName() {
		return shortName==null?"":shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public String getLongName() {
		return longName==null?"":longName;
	}

	public void setLongName(String longName) {
		this.longName = longName;
	}
	

	@Override
	public String toTreeString() {
		// TODO Auto-generated method stub
		String data = "id:"+this.getId()+",text:"+this.getName()+
				",state:"+this.getState()+",parentid:"+this.getParentid();
		return data;
	}



	public String getSiteName() {
		return siteName;
	}



	public void setSiteName(String siteName) {
		this.siteName = siteName;
	}

	



	public Long getAccounting_deptid() {
		return accounting_deptid;
	}



	public void setAccounting_deptid(Long accounting_deptid) {
		this.accounting_deptid = accounting_deptid;
	}



	public String getExtend() {
		return extend;
	}



	public void setExtend(String extend) {
		this.extend = extend;
	}



	@Override
	public String getNodeType() {
		// TODO Auto-generated method stub
		return this.nodeType;
	}



	@Override
	public void setNodeType(String nodeType) {
		// TODO Auto-generated method stub
		this.nodeType = nodeType;
	}



	@Override
	public void setText(String text) {
		// TODO Auto-generated method stub
		this.name = text;
	}
	
	

}
